package com.siki.pojo.commonEntity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.siki.pojo.base.BaseUuEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.List;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel("企业信息实体")
@Entity
@Table(name = "enterprise")
@TableName(value = "enterprise", resultMap = "com.siki.mapper.CommonMap.enterpriseResult")
public class Enterprise extends BaseUuEntity {

    @ApiModelProperty(value = "企业所在地址")
    private String address;

    @ApiModelProperty(value = "企业邮箱")
    private String email;

    @ApiModelProperty(value = "头像url")
    private String avatarUrl;

    @ApiModelProperty(value = "公司介绍")
    private String introduction;

    @ApiModelProperty("是否被禁止:true[是]false[否]")
    @TableField(fill = FieldFill.INSERT)
    private Boolean forbid;

    @ApiModelProperty("user")
    @TableField(exist = false)
    @OneToOne
    private SysUser sysUser;

    @ApiModelProperty("岗位")
    @OneToMany(mappedBy = "enterprise")
    @TableField(exist = false)
    List<TalentPosition> talentPositions;

    @ApiModelProperty("企业拉黑的用户")
    @OneToMany(mappedBy = "blackEnterprise")
    @TableField(exist = false)
    List<GeneralUser> generalUsers;
}
